#!/bin/sh
echo "set core dump start "
echo "*               soft    core           unlimited" >> /etc/security/limits.conf
echo "*               hard    core           unlimited" >> /etc/security/limits.conf

echo "session required pam_limits.so" >> /etc/pam.d/common-session
echo "session required pam_limits.so" >> /etc/pam.d/common-session-noninteractive
echo "ulimit -c unlimited" >> ~/.bashrc
ulimit -a
echo core-%e-%p-%t | sudo tee /proc/sys/kernel/core_pattern 

echo "set finish: use test  ulimit -a "
